package com.archgeek.java.conc.synchro;

/**
 * @author pizhihui
 * @date 2024-03-20 13:17
 */
public class SyncDemo1 {

//    Object lock = new Object();

//    public void m1() {
//        synchronized (lock) {
//            System.out.println("hello---------synchronized code block ------------------");
//
//            throw new RuntimeException("excpetion xxxxxx");
////            try {
////            } catch (Exception e) {
////                e.printStackTrace();
////            }
//        }
//    }

//    public synchronized void m2() {
//        System.out.println("------------m2------------");
//    }

    public static synchronized void m3() {
        System.out.println("------------m3------------");
    }


}
